"use strict";

const router = require("express").Router();
const lightApp = require("../apps/light_app_app");
const validate = require("../utils/validate");
router.all("*", validate.isFalsified, validate.logined, validate.isAdmin);

router.post("/", lightApp.saveLightApp);
router.delete("/:id", lightApp.deleteLightAppById);
router.put("/:id", lightApp.updateLightAppById);
router.get("/list", lightApp.getLightAppListByUser);
router.get("/:id", lightApp.getLightAppById);

module.exports = router;
